home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume91 / news / barn_201 / part01 / screenstuff.h < prev    next >
C/C++ Source or Header  |  1991-02-07  |  871b  |  35 lines

  1. /*
  2.  *    File Name:        screenstuff.h
  3.  *    Project:        BARN - Bah's Amiga ReadNews.
  4.  *    Purpose:        Screen attribute defines.
  5.  *    Author:            Jeff Van Epps
  6.  *    Created:        06 Jan 91
  7.  *    Last Modified:    06 Jan 91
  8.  *    Comments:
  9.  *        If compiling on a Sun we try to use the System V version of the
  10.  *        curses library.  On the Amiga we use ANSI sequences.
  11.  *
  12.  *    History:
  13.  *        06 Jan 91/JVE    Created.
  14.  */
  15.  
  16.  
  17. # ifdef sun
  18.  
  19. # include    <curses.h>
  20. # define    Clear_Screen    clear()
  21. # define    UL_ON            attron( A_UNDERLINE )
  22. # define    UL_OFF            attroff( A_UNDERLINE )
  23. # define    INVERSE_ON        attron( A_REVERSE )
  24. # define    INVERSE_OFF        attroff( A_REVERSE )
  25.  
  26. # else  /* not sun */
  27.  
  28. # define Clear_Screen printf("\x1b[H\x1b[2J")
  29. # define    UL_ON            printf( "\x1b[4m" )
  30. # define    UL_OFF            printf( "\x1b[0m" )
  31. # define    INVERSE_ON        printf("\x9b\x37;38;40m")
  32. # define    INVERSE_OFF        printf("\x9b\x30;33;40m\033[0m")
  33.  
  34. # endif /* sun */
  35.